// UContentDao.java
package org.example.DAO;

import org.example.entity.SearchResult;
import org.example.entity.UContent;
import org.example.entity.Comment;
import java.sql.SQLException;
import java.util.List;

public interface UContentDao {
    List<SearchResult> searchContent(String sql, String query, String type, int limit, int offset) throws SQLException;
    int getSearchCount(String sql, String query, String type) throws SQLException;
    UContent getContentById(int id) throws SQLException;
    List<UContent> getPopularContents(int limit) throws SQLException;
    List<UContent> getNewestContents(int limit) throws SQLException;
    boolean updateContentRating(int contentId, double newRating, int ratingCount) throws SQLException;
    List<UContent> getRecommendations(String contentType, int excludeId, int limit) throws SQLException;
    List<Comment> getComments(int contentId) throws SQLException;

}
